import sys

import click

from sw2py import swagger


@click.command()
@click.option('-o', '--output', default='output')
@click.option('-s', '--suitcase', default='')
@click.argument('filename')
def main(filename, suitcase, output):
    files = swagger.load_swagger(filename)
    swagger.sw2py(files, output, suitcase)


if __name__ == "__main__":
    sys.exit(main())
